﻿/*****************************************介绍*****************************************
 * 作者：User
 * 创建时间：2025-05-19 12:21:50
 * 功能：界面【ToastPanel】的View
        1、负责收集所有控件
**************************************************************************************/

using Game.Framework;
using UnityEngine.UI;

namespace Game.UI.ToastPanel
{
    public class ToastPanelView : BasePanel
    {
        public const string PANEL_KEY = "ToastPanel_Key";

        protected override void RegistAny()
        {
            PanelManager.Instance.RegistPanel(PANEL_KEY, this);
        }

        protected override void UnregistAny()
        {
            PanelManager.Instance.UnregistPanel(PANEL_KEY);
        }

        public override void Init(object data)
        {
            GetControl<Text>(ToastPanelNotifications.Tip_CTRL).text = data.ToString();
        }

        private void OnAnimComplate()
        {
            Hide();
        }
    }
}